sequential circuits for gate